package IO.io_5_9;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author bruin_du
 * @description 文件内容的读写
 * @date 2022/5/11 22:41
 **/
public class ReadFile2 {
    public static void main(String[] args) {
        try(InputStream is = new FileInputStream("C:\\Users\\乔治\\Desktop\\博客\\MySQL\\mysql.png")){
            long s = System.currentTimeMillis();
            while(true){
                int b = is.read();
                if(b == -1){
                    break;
                }
            }
            long e = System.currentTimeMillis();
            System.out.println(e - s);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
